-
Notifications
You must be signed in to change notification settings - Fork 86
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Debounce force center after view animation. #9541
Conversation
This code is required to don't get bury tiles, this should be activated by default, we can add an option to be able to disable it. |
Ok, I've more contexte now, so all the PSC asked for this feature because at some point, OL changes has made the WMTS layers sometimes blury. |
0200a62
to
b8815c3
Compare
Cleaner code and allow a js way to remove/reset/update this function if needed. Keep the function to be sure the layers are not blurry. But also add a debounce to not have a map "jumping around" on zoom-in/out.
b8815c3
to
241db69
Compare
I've tried several on different configuration to reproduce the "blurry effect", even with the commit before the original fix, but I was not able to see any difference. If we had a map quality issue with OpenLayers 7, there are good chance that it's fixed now. Therefor, I would still recommend to remove this function "setCenter" function. However, as I can't give guaranty that the blur effect is gone, I've added a debounce around the original fix. It allows to keep this fix, and avoid to recenter too frequently during the zoom (avoid the jumping-around effect). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice thanks :-)
Thanks @ger-benjamin for your tests! ping @gnerred |
Don't hesitate to open again the issue if needed (but I'm pretty confident on my fix). |
Thanks @ger-benjamin and @maltaesousa , I will test it asap. |
I've upgraded our Cartoriviera instance to 2.8.1.170, and the problem is fixed. Thanks a lot ! |
For https://camptocamp.atlassian.net/browse/GSSCHWYZ-429
And camptocamp/GeoMapFish#92
But will break (origin): https://camptocamp.atlassian.net/browse/GSGMF-2009
Who looks to be a issue on a particular GMF.
This workaround was making the map less blurry in case of map height with a not round number of pixels, but it cause the map zoom to "jump" if the view.contrainResolution is set to true.
My idea is to trash this function, and let the concerned GMF implement it on need.
Another possibility would be keep the function in the code but not active by default (let the user choose if he want to use it).
Or to add a options in the vars to activate it or not.
If we keep it we could also add a debounce to to not recenter too quickly.
Examples
Storybook
API help
API documentation